<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>Preferences - SWT &gt; Code Generation &gt; Variables</title>
<link href="../../../book.css" rel="stylesheet" type="text/css">
</head>

<body><h1>Preferences - SWT &gt; Code Generation &gt; Variables</h1>
<table border="0" width="800" cellspacing="0" cellpadding="0">
	<tr>
		<td>This page is used to control various <b>SWT &gt; Code Generation &gt; 
		Variables</b> options.<ul>
			<li><font size="4"><b><a href="#TypeSpecific">Type specific</a></b></font></li>
			<li><font size="4"><b><a href="#AutoRename">Auto rename</a></b></font></li>
			<li><font size="4"><b><a href="#Miscellaneous">Miscellaneous</a></b></font></li>
		</ul>

<h1 style='margin-top:12.0pt;text-align:justify;line-height:
14.0pt;mso-pagination:widow-orphan lines-together;tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in 3.5in 4.0in 4.5in 5.0in 5.5in 6.0in right 6.5in'>
<a name="TypeSpecific">Type specific</a></h1>
		<p style='margin-top:12.0pt;text-align:justify;line-height:
14.0pt;mso-pagination:widow-orphan lines-together;tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in 3.5in 4.0in 4.5in 5.0in 5.5in 6.0in right 6.5in'>
		<img src="images/preferences_variables_type_specific.gif"></p>
		<p class=MsoNormal style='margin-top:12.0pt;text-align:justify;line-height:
14.0pt;mso-pagination:widow-orphan lines-together;tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in 3.5in 4.0in 4.5in 5.0in 5.5in 6.0in right 6.5in'>There
are already several types listed in the table. You can add more types by clicking on the <b> Add</b> button and entering in the
name of the class you want to add in the dialog box that appears. To remove a type, highlight it in the table
and click on <b>Remove</b>.</p>

<p class=MsoNormal style='margin-top:12.0pt;text-align:justify;line-height:
14.0pt;mso-pagination:widow-orphan lines-together;tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in 3.5in 4.0in 4.5in 5.0in 5.5in 6.0in right 6.5in'>The
<b>Default Name</b> column of the table lets you change what variable name is
initially used when a control of that type is created. To change the default name, simply click in
the table cell that you wish to modify and type in the name. Press Enter to apply the change or Esc to 
cancel. Any names that are entered must be valid Java identifiers.</p>
		<p class=MsoNormal style='margin-top:12.0pt;text-align:justify;line-height:
14.0pt;mso-pagination:widow-orphan lines-together;tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in 3.5in 4.0in 4.5in 5.0in 5.5in 6.0in right 6.5in'>
		The <b>Acronym</b> column of the table lets you specify a short name for 
		the type that is used in automatic variable renaming. Any acronyms that 
		are entered must be valid Java identifiers.</p>

<p class=MsoNormal style='margin-top:12.0pt;text-align:justify;line-height:
14.0pt;mso-pagination:widow-orphan lines-together;tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in 3.5in 4.0in 4.5in 5.0in 5.5in 6.0in right 6.5in'>The
<b>As Field</b> column has a checkbox for each table item. If an item's <b>As Field</b> cell is checked, all new controls of that
type will be created as a field. When a
control is created as a field, it places the declaration of the control in the
class outside of any methods.</p>

<h1 style='margin-top:12.0pt;text-align:justify;line-height:
14.0pt;mso-pagination:widow-orphan lines-together;tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in 3.5in 4.0in 4.5in 5.0in 5.5in 6.0in right 6.5in'>
<a name="AutoRename">Auto rename</a></h1>
	<h2>
	<img src="images/preferences_variables_auto_rename.gif"></h2>
      <h2>Use text component variable auto rename</h2>
      <p>This preference determines whether component variable 
		names are renamed based on the value of the text component. This can be set to 
		&quot;Always&quot;, &quot;Never&quot; or &quot;For default names&quot;. The later means that only 
		components that still have their default names will be renamed. Once 
		renamed, they will not be renamed again.<h2>Create variable using 
	pattern</h2>
      <p>This preference determines what pattern is used when creating a 
		new variable name. Available pattern parts are:<ul>
		<li>${class_acronym} - the acronym of the short class name</li>
		<li>${text} - the value of the text property</li>
		<li>${class_name} - the short class name</li>
		<li>${default_name} - the default name of the component</li>
		</ul>
		<h2>Process only <i>n</i> words of text value</h2>
      <p>This preference determines how many words from the text component 
		are used when generating the new variable name. Use &quot;0&quot; for no 
		limit.<h1 style='margin-top:12.0pt;text-align:justify;line-height:
14.0pt;mso-pagination:widow-orphan lines-together;tab-stops:0in .5in 1.0in 1.5in 2.0in 2.5in 3.0in 3.5in 4.0in 4.5in 5.0in 5.5in 6.0in right 6.5in'>
		<a name="Miscellaneous">Miscellaneous</a></h1>
	<h2>
	<img src="images/preferences_variables_miscellaneous.gif"></h2>
		<h2>
	Remember variable name in component</h2>
      <p>This preference determines whether the widget's name in the widget's 
		data using <b>setData(&quot;name&quot;, &quot;widget-name&quot;)</b>..</td>
	</tr>
</table>

</body></html>